{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:42.387789Z",
     "start_time": "2019-09-05T22:09:32.513804Z"
    }
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "\n",
    "import os\n",
    "\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"4\"\n",
    "\n",
    "import torch\n",
    "import numpy as np\n",
    "import pickle as pk\n",
    "\n",
    "from tqdm import tqdm_notebook\n",
    "from sklearn.metrics import cohen_kappa_score\n",
    "from fastai.vision import *\n",
    "from torch.nn import functional as F\n",
    "from utils import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:42.398944Z",
     "start_time": "2019-09-05T22:09:42.392304Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0906_06-09-42\n"
     ]
    }
   ],
   "source": [
    "current_time = get_BJ_time()\n",
    "print(current_time)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:42.428697Z",
     "start_time": "2019-09-05T22:09:42.402517Z"
    }
   },
   "outputs": [],
   "source": [
    "import random\n",
    "\n",
    "def seed_everything(seed):\n",
    "    random.seed(seed)\n",
    "    os.environ['PYTHONHASHSEED'] = str(seed)\n",
    "    np.random.seed(seed)\n",
    "    torch.manual_seed(seed)\n",
    "    torch.cuda.manual_seed(seed)\n",
    "    torch.backends.cudnn.deterministic = True\n",
    "SEED = 2019\n",
    "seed_everything(SEED)\n",
    "\n",
    "deployment_dir = \"../output/inference\"\n",
    "\n",
    "def qk(y_pred, y):\n",
    "    k = torch.tensor(cohen_kappa_score(torch.round(y_pred), y, weights='quadratic'), device='cuda:0')\n",
    "    k[k != k] = 0\n",
    "    k[torch.isinf(k)] = 0\n",
    "    \n",
    "    return k\n",
    "\n",
    "df_2019_cv = pd.read_csv('../input/aptos-data-split/df_2019_cv.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:42.454359Z",
     "start_time": "2019-09-05T22:09:42.430634Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id_code</th>\n",
       "      <th>diagnosis</th>\n",
       "      <th>path</th>\n",
       "      <th>is_valid1</th>\n",
       "      <th>is_valid2</th>\n",
       "      <th>is_valid3</th>\n",
       "      <th>is_valid4</th>\n",
       "      <th>is_valid5</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000c1434d8d7</td>\n",
       "      <td>2</td>\n",
       "      <td>../input/aptos2019-blindness-detection/train_i...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>001639a390f0</td>\n",
       "      <td>4</td>\n",
       "      <td>../input/aptos2019-blindness-detection/train_i...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0024cdab0c1e</td>\n",
       "      <td>1</td>\n",
       "      <td>../input/aptos2019-blindness-detection/train_i...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>002c21358ce6</td>\n",
       "      <td>0</td>\n",
       "      <td>../input/aptos2019-blindness-detection/train_i...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>005b95c28852</td>\n",
       "      <td>0</td>\n",
       "      <td>../input/aptos2019-blindness-detection/train_i...</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        id_code  diagnosis                                               path  \\\n",
       "0  000c1434d8d7          2  ../input/aptos2019-blindness-detection/train_i...   \n",
       "1  001639a390f0          4  ../input/aptos2019-blindness-detection/train_i...   \n",
       "2  0024cdab0c1e          1  ../input/aptos2019-blindness-detection/train_i...   \n",
       "3  002c21358ce6          0  ../input/aptos2019-blindness-detection/train_i...   \n",
       "4  005b95c28852          0  ../input/aptos2019-blindness-detection/train_i...   \n",
       "\n",
       "   is_valid1  is_valid2  is_valid3  is_valid4  is_valid5  \n",
       "0       True      False      False      False      False  \n",
       "1       True      False      False      False      False  \n",
       "2       True      False      False      False      False  \n",
       "3       True      False      False      False      False  \n",
       "4       True      False      False      False      False  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_2019_cv.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:42.466194Z",
     "start_time": "2019-09-05T22:09:42.456684Z"
    }
   },
   "outputs": [],
   "source": [
    "test_df = pd.read_csv('../input/aptos2019-blindness-detection/sample_submission.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Feature Extraction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-08-22T17:52:08.556127Z",
     "start_time": "2019-08-22T17:52:08.554197Z"
    }
   },
   "source": [
    "## Train logits"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### b3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:09:54.641726Z",
     "start_time": "2019-09-05T22:09:54.638180Z"
    }
   },
   "outputs": [],
   "source": [
    "b3_models = [\"efficientnet-b3_0901_16-45-51_stage2_f1\", \"efficientnet-b3_0901_16-45-51_stage2_f2\",\n",
    "                  \"efficientnet-b3_0901_16-45-51_stage2_f3\", \"efficientnet-b3_0901_16-45-51_stage2_f4\",\n",
    "                  \"efficientnet-b3_0901_16-45-51_stage2_f5\"]\n",
    "\n",
    "b3_train_logits_list = []\n",
    "\n",
    "for i, m in enumerate(b3_models):\n",
    "    fold = i + 1\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "    val_df = df_2019_cv[df_2019_cv[\"is_valid{}\".format(fold)]]\n",
    "    learn.data.add_test(ImageList.from_df(val_df,\n",
    "                                          '../input/aptos2019-blindness-detection',\n",
    "                                          cols=\"id_code\",\n",
    "                                          folder='train_images_ben_preprocessing_sigmaX10',\n",
    "                                          suffix='.png'))\n",
    "\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b3_train_logits_list.append(logits)\n",
    "    np.save(\"../output/stacking/{}_logits.npy\".format(m), logits)\n",
    "\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### b4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:10:02.404786Z",
     "start_time": "2019-09-05T22:10:02.398354Z"
    }
   },
   "outputs": [],
   "source": [
    "b4_models = [\"efficientnet-b4_0820_01-09-57_stage2_f1\", \"efficientnet-b4_0820_01-09-57_stage2_f2\",\n",
    "                  \"efficientnet-b4_0820_01-09-57_stage2_f3\", \"efficientnet-b4_0820_01-09-57_stage2_f4\",\n",
    "                  \"efficientnet-b4_0821_00-02-25_stage2_f5\"]\n",
    "\n",
    "b4_train_logits_list = []\n",
    "for i, m in enumerate(b4_models):\n",
    "    fold = i + 1\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "    val_df = df_2019_cv[df_2019_cv[\"is_valid{}\".format(fold)]]\n",
    "    learn.data.add_test(ImageList.from_df(val_df,\n",
    "                                          '../input/aptos2019-blindness-detection',\n",
    "                                          cols=\"id_code\",\n",
    "                                          folder='train_images_ben_preprocessing_sigmaX10',\n",
    "                                          suffix='.png'))\n",
    "\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b4_train_logits_list.append(logits)\n",
    "    np.save(\"../output/stacking/{}_logits.npy\".format(m), logits)\n",
    "\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### b5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:10:08.018801Z",
     "start_time": "2019-09-05T22:10:08.015034Z"
    }
   },
   "outputs": [],
   "source": [
    "b5_models = [\"efficientnet-b5_0820_01-32-30_stage2_f1\", \"efficientnet-b5_0903_01-03-41_stage2_f2\",\n",
    "                  \"efficientnet-b5_0820_22-13-07_stage2_f3\", \"efficientnet-b5_0821_01-30-37_stage2_f4\",\n",
    "                  \"efficientnet-b5_0821_00-26-51_stage2_f5\"]\n",
    "\n",
    "b5_train_logits_list = []\n",
    "for i, m in enumerate(b5_models):\n",
    "    fold = i + 1\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "    val_df = df_2019_cv[df_2019_cv[\"is_valid{}\".format(fold)]]\n",
    "    learn.data.add_test(ImageList.from_df(val_df,\n",
    "                                          '../input/aptos2019-blindness-detection',\n",
    "                                          cols=\"id_code\",\n",
    "                                          folder='train_images_ben_preprocessing_sigmaX10',\n",
    "                                          suffix='.png'))\n",
    "\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b5_train_logits_list.append(logits)\n",
    "    np.save(\"../output/stacking/{}_logits.npy\".format(m), logits)\n",
    "\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Test Feature"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-08-23T11:08:00.430735Z",
     "start_time": "2019-08-23T11:08:00.427585Z"
    }
   },
   "source": [
    "### Average"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-08-22T20:31:22.015853Z",
     "start_time": "2019-08-22T20:31:22.013172Z"
    }
   },
   "source": [
    "#### b3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-02T21:30:29.258704Z",
     "start_time": "2019-09-02T21:29:46.017018Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1928, 1)\n"
     ]
    }
   ],
   "source": [
    "b3_test_logits_list = []\n",
    "for m in b3_models:\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "\n",
    "    learn.data.add_test(ImageList.from_df(test_df,\n",
    "                                      '../input/aptos2019-blindness-detection',\n",
    "                                      folder='test_images_ben_preprocessing_sigmaX10',\n",
    "                                      suffix='.png'))\n",
    "\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b3_test_logits_list.append(logits)\n",
    "    \n",
    "    np.save(\"../output/stacking/{}_logits_test.npy\".format(m), logits)\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### b4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-02T21:31:01.865810Z",
     "start_time": "2019-09-02T21:30:29.262134Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1928, 1)\n"
     ]
    }
   ],
   "source": [
    "b4_test_logits_list = []\n",
    "for m in b4_models:\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "\n",
    "    learn.data.add_test(ImageList.from_df(test_df,\n",
    "                                      '../input/aptos2019-blindness-detection',\n",
    "                                      folder='test_images_ben_preprocessing_sigmaX10',\n",
    "                                      suffix='.png'))\n",
    "\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b4_test_logits_list.append(logits)\n",
    "    \n",
    "    np.save(\"../output/stacking/{}_logits_test.npy\".format(m), logits)\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### b5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-02T21:31:42.018598Z",
     "start_time": "2019-09-02T21:31:01.873758Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1928, 1)\n"
     ]
    }
   ],
   "source": [
    "b5_test_logits_list = []\n",
    "for m in b5_models:\n",
    "    learn = load_learner(deployment_dir, \"{}.pkl\".format(m))\n",
    "\n",
    "    learn.data.add_test(ImageList.from_df(test_df,\n",
    "                                      '../input/aptos2019-blindness-detection',\n",
    "                                      folder='test_images_ben_preprocessing_sigmaX10',\n",
    "                                      suffix='.png'))\n",
    "    logits,_ = learn.get_preds(DatasetType.Test)\n",
    "    logits = logits.numpy()\n",
    "    b5_test_logits_list.append(logits)\n",
    "    \n",
    "    np.save(\"../output/stacking/{}_logits_test.npy\".format(m), logits)\n",
    "    print(logits.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-08-22T14:03:21.632429Z",
     "start_time": "2019-08-22T14:03:21.627914Z"
    }
   },
   "source": [
    "# Train Stage 2 model on OOF"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:16:39.106658Z",
     "start_time": "2019-09-05T22:16:39.102021Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import make_scorer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:16:39.750943Z",
     "start_time": "2019-09-05T22:16:39.745101Z"
    }
   },
   "outputs": [],
   "source": [
    "def qk_np(y, y_pred):\n",
    "    k = cohen_kappa_score(np.round(y_pred), y, weights='quadratic')\n",
    "    \n",
    "    return k\n",
    "\n",
    "score = make_scorer(qk_np, greater_is_better=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:13:20.014982Z",
     "start_time": "2019-09-05T22:13:19.994165Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(733, 1)\n",
      "(733, 1)\n",
      "(733, 1)\n",
      "(732, 1)\n",
      "(731, 1)\n",
      "(733, 1)\n",
      "(733, 1)\n",
      "(733, 1)\n",
      "(732, 1)\n",
      "(731, 1)\n",
      "(733, 1)\n",
      "(733, 1)\n",
      "(733, 1)\n",
      "(732, 1)\n",
      "(731, 1)\n"
     ]
    }
   ],
   "source": [
    "b3_train_logits_list = []\n",
    "for m in b3_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits.npy\".format(m))\n",
    "    b3_train_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "    \n",
    "b4_train_logits_list = []\n",
    "for m in b4_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits.npy\".format(m))\n",
    "    b4_train_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "\n",
    "b5_train_logits_list = []\n",
    "for m in b5_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits.npy\".format(m))\n",
    "    b5_train_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:13:55.854316Z",
     "start_time": "2019-09-05T22:13:55.835799Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(3662, 3)\n"
     ]
    }
   ],
   "source": [
    "X_train = np.concatenate([np.concatenate(b3_train_logits_list, axis=0),\n",
    "                         np.concatenate(b4_train_logits_list, axis=0),\n",
    "                         np.concatenate(b5_train_logits_list, axis=0)], axis=1)\n",
    "y_train = []\n",
    "n_fold = 5\n",
    "\n",
    "for i in range(1, n_fold+1):\n",
    "    label_t = df_2019_cv[df_2019_cv[\"is_valid{}\".format(i)]][\"diagnosis\"].tolist()\n",
    "    y_train += label_t\n",
    "    \n",
    "print(X_train.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## LightGBM "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T20:05:24.080573Z",
     "start_time": "2019-09-06T20:05:24.051047Z"
    }
   },
   "outputs": [],
   "source": [
    "import lightgbm as lgb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2019-09-06T12:06:58.658Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 5 folds for each of 16200 candidates, totalling 81000 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=-1)]: Using backend LokyBackend with 64 concurrent workers.\n",
      "[Parallel(n_jobs=-1)]: Done  72 tasks      | elapsed:    3.7s\n",
      "[Parallel(n_jobs=-1)]: Done 322 tasks      | elapsed:    6.3s\n",
      "[Parallel(n_jobs=-1)]: Done 672 tasks      | elapsed:   10.4s\n",
      "[Parallel(n_jobs=-1)]: Done 1122 tasks      | elapsed:   15.7s\n",
      "[Parallel(n_jobs=-1)]: Done 1672 tasks      | elapsed:   22.2s\n",
      "[Parallel(n_jobs=-1)]: Done 2322 tasks      | elapsed:   29.8s\n",
      "[Parallel(n_jobs=-1)]: Done 3072 tasks      | elapsed:   38.3s\n",
      "[Parallel(n_jobs=-1)]: Done 3922 tasks      | elapsed:   48.0s\n",
      "[Parallel(n_jobs=-1)]: Done 4872 tasks      | elapsed:   58.9s\n",
      "[Parallel(n_jobs=-1)]: Done 5922 tasks      | elapsed:  1.2min\n",
      "[Parallel(n_jobs=-1)]: Done 7072 tasks      | elapsed:  1.4min\n",
      "[Parallel(n_jobs=-1)]: Done 8322 tasks      | elapsed:  1.7min\n",
      "[Parallel(n_jobs=-1)]: Done 9672 tasks      | elapsed:  1.9min\n",
      "[Parallel(n_jobs=-1)]: Done 11122 tasks      | elapsed:  2.2min\n",
      "[Parallel(n_jobs=-1)]: Done 12672 tasks      | elapsed:  2.5min\n",
      "[Parallel(n_jobs=-1)]: Done 14322 tasks      | elapsed:  2.8min\n",
      "[Parallel(n_jobs=-1)]: Done 16072 tasks      | elapsed:  3.1min\n",
      "[Parallel(n_jobs=-1)]: Done 17922 tasks      | elapsed:  3.5min\n",
      "[Parallel(n_jobs=-1)]: Done 19872 tasks      | elapsed:  3.9min\n",
      "[Parallel(n_jobs=-1)]: Done 21922 tasks      | elapsed:  4.3min\n",
      "[Parallel(n_jobs=-1)]: Done 24072 tasks      | elapsed:  4.7min\n",
      "[Parallel(n_jobs=-1)]: Done 26322 tasks      | elapsed:  5.1min\n",
      "[Parallel(n_jobs=-1)]: Done 28672 tasks      | elapsed:  5.6min\n",
      "[Parallel(n_jobs=-1)]: Done 31122 tasks      | elapsed:  6.0min\n",
      "[Parallel(n_jobs=-1)]: Done 33672 tasks      | elapsed:  6.5min\n",
      "[Parallel(n_jobs=-1)]: Done 36322 tasks      | elapsed:  7.0min\n",
      "[Parallel(n_jobs=-1)]: Done 39072 tasks      | elapsed:  7.6min\n",
      "[Parallel(n_jobs=-1)]: Done 41922 tasks      | elapsed:  8.1min\n",
      "[Parallel(n_jobs=-1)]: Done 44872 tasks      | elapsed:  8.7min\n",
      "[Parallel(n_jobs=-1)]: Done 47922 tasks      | elapsed:  9.3min\n",
      "[Parallel(n_jobs=-1)]: Done 51072 tasks      | elapsed:  9.9min\n",
      "[Parallel(n_jobs=-1)]: Done 54322 tasks      | elapsed: 10.5min\n"
     ]
    }
   ],
   "source": [
    "estimator = lgb.LGBMRegressor(random_state=SEED)\n",
    "\n",
    "param_grid = {\n",
    "    'max_depth': [3, 5],     \n",
    "#     'max_depth': [5],   \n",
    "#     'learning_rate': [0.05], \n",
    "    'learning_rate': [0.01, 0.05, 0.1],\n",
    "    'feature_fraction': [0.6, 0.7, 0.8, 0.9, 0.95],\n",
    "#     'feature_fraction': [0.7],\n",
    "    'bagging_fraction': [0.6, 0.7, 0.8, 0.9, 0.95],\n",
    "#     'bagging_fraction': [0.7],\n",
    "#     'bagging_freq': [8],\n",
    "    'bagging_freq': [5, 6, 8],\n",
    "    'lambda_l1': [0, 0.1, 0.4],\n",
    "#     'lambda_l1': [0],\n",
    "#     'lambda_l2': [15],\n",
    "    'lambda_l2': [0, 10, 15, 20],\n",
    "#     'cat_smooth': [1],\n",
    "    'cat_smooth': [1, 10, 15],\n",
    "}\n",
    "\n",
    "gbm = GridSearchCV(estimator, param_grid, cv=5, n_jobs=-1, scoring=score, verbose=1)\n",
    "gbm.fit(X_train, y_train)\n",
    "\n",
    "print('Best parameters found by grid search are:', gbm.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2019-09-06T12:07:00.095Z"
    }
   },
   "outputs": [],
   "source": [
    "gbm.cv_results_   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2019-09-06T12:07:01.251Z"
    }
   },
   "outputs": [],
   "source": [
    "print(gbm.best_score_, qk_np(y_train, xlf.predict(X_train)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2019-09-06T12:07:01.964Z"
    }
   },
   "outputs": [],
   "source": [
    "model_save_name = \"lightgbm-{}\".format(current_time)\n",
    "\n",
    "with open(os.path.join(deployment_dir, model_save_name+\".pkl\"), \"wb\") as f:\n",
    "    pk.dump(gbm.best_estimator_, f)\n",
    "\n",
    "print(model_save_name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## XGBoost "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T09:43:19.360032Z",
     "start_time": "2019-09-03T09:43:19.238200Z"
    }
   },
   "outputs": [],
   "source": [
    "import xgboost as xgb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T10:39:59.389264Z",
     "start_time": "2019-09-03T10:34:14.040597Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 5 folds for each of 125 candidates, totalling 625 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=16)]: Using backend LokyBackend with 16 concurrent workers.\n",
      "[Parallel(n_jobs=16)]: Done  18 tasks      | elapsed:   27.9s\n",
      "[Parallel(n_jobs=16)]: Done 168 tasks      | elapsed:  1.9min\n",
      "[Parallel(n_jobs=16)]: Done 418 tasks      | elapsed:  4.0min\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best parameters found by grid search are: {'colsample_bytree': 0.7, 'learning_rate': 0.1, 'max_delta_step': 2, 'max_depth': 3, 'min_child_weight': 20, 'reg_alpha': 0, 'reg_lambda': 0.6, 'scale_pos_weight': 0.8, 'subsample': 0.8}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=16)]: Done 625 out of 625 | elapsed:  5.8min finished\n"
     ]
    }
   ],
   "source": [
    "estimator_xgb = xgb.XGBRegressor(n_jobs=8, random_state=SEED)\n",
    "\n",
    "parameters = {\n",
    "              'max_depth': [3],\n",
    "              'learning_rate': [0.1],\n",
    "#               'learning_rate': [0.01, 0.02, 0.05, 0.1, 0.15],\n",
    "              'min_child_weight': [20],\n",
    "#               'min_child_weight': [0, 2, 5, 10, 20],\n",
    "              'max_delta_step': [2],\n",
    "#               'max_delta_step': [0, 0.2, 0.6, 1, 2],\n",
    "              'subsample': [0.8],\n",
    "#               'subsample': [0.6, 0.7, 0.8, 0.85, 0.95],\n",
    "              'colsample_bytree': [0.7],\n",
    "#               'colsample_bytree': [0.5, 0.6, 0.7, 0.8, 0.9],\n",
    "              'reg_alpha': [0],\n",
    "#               'reg_alpha': [0, 0.25, 0.5, 0.75, 1],\n",
    "              'reg_lambda': [0.6],\n",
    "#               'reg_lambda': [0.2, 0.4, 0.6, 0.8, 1],\n",
    "              'scale_pos_weight': [0.8]\n",
    "#               'scale_pos_weight': [0.2, 0.4, 0.6, 0.8, 1]\n",
    "}\n",
    "\n",
    "xlf = GridSearchCV(estimator_xgb, parameters, cv=5, n_jobs=16, scoring=score, verbose=1)\n",
    "xlf.fit(X_train, y_train)\n",
    "\n",
    "print('Best parameters found by grid search are:', xlf.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T10:39:59.447506Z",
     "start_time": "2019-09-03T10:39:59.393698Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'mean_fit_time': array([16.576894, 19.437918, 24.421603,  7.953644, ...,  3.725325,  2.692475,  1.895665,  1.726808]),\n",
       " 'std_fit_time': array([5.719804, 7.203137, 5.606267, 4.825887, ..., 0.258053, 0.426859, 0.324031, 0.263813]),\n",
       " 'mean_score_time': array([0.389374, 0.853573, 0.906028, 0.447795, ..., 0.974211, 1.474732, 1.209976, 1.393587]),\n",
       " 'std_score_time': array([0.327546, 0.909945, 0.826804, 0.317137, ..., 0.33777 , 0.426922, 0.727559, 0.281498]),\n",
       " 'param_colsample_bytree': masked_array(data=[0.7, 0.7, 0.7, 0.7, ..., 0.7, 0.7, 0.7, 0.7],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_learning_rate': masked_array(data=[0.1, 0.1, 0.1, 0.1, ..., 0.1, 0.1, 0.1, 0.1],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_max_delta_step': masked_array(data=[2, 2, 2, 2, ..., 2, 2, 2, 2],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_max_depth': masked_array(data=[3, 3, 3, 3, ..., 3, 3, 3, 3],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_min_child_weight': masked_array(data=[20, 20, 20, 20, ..., 20, 20, 20, 20],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_reg_alpha': masked_array(data=[0, 0, 0, 0, ..., 1, 1, 1, 1],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_reg_lambda': masked_array(data=[0.2, 0.2, 0.2, 0.2, ..., 1, 1, 1, 1],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_scale_pos_weight': masked_array(data=[0.2, 0.4, 0.6, 0.8, ..., 0.4, 0.6, 0.8, 1],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_subsample': masked_array(data=[0.8, 0.8, 0.8, 0.8, ..., 0.8, 0.8, 0.8, 0.8],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'params': [{'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.25,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.5,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 0.75,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.2,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.4,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.6,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 0.8,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.2,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.4,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.6,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 0.8,\n",
       "   'subsample': 0.8},\n",
       "  {'colsample_bytree': 0.7,\n",
       "   'learning_rate': 0.1,\n",
       "   'max_delta_step': 2,\n",
       "   'max_depth': 3,\n",
       "   'min_child_weight': 20,\n",
       "   'reg_alpha': 1,\n",
       "   'reg_lambda': 1,\n",
       "   'scale_pos_weight': 1,\n",
       "   'subsample': 0.8}],\n",
       " 'split0_test_score': array([0.922279, 0.92716 , 0.927277, 0.928533, ..., 0.926694, 0.927292, 0.927335, 0.929291]),\n",
       " 'split1_test_score': array([0.92659 , 0.933223, 0.932487, 0.927891, ..., 0.929059, 0.933336, 0.929597, 0.925012]),\n",
       " 'split2_test_score': array([0.923173, 0.92633 , 0.925613, 0.926413, ..., 0.925357, 0.926782, 0.923605, 0.920925]),\n",
       " 'split3_test_score': array([0.923646, 0.925544, 0.926207, 0.925394, ..., 0.924209, 0.925105, 0.924492, 0.923461]),\n",
       " 'split4_test_score': array([0.921116, 0.921326, 0.921862, 0.922972, ..., 0.921146, 0.922715, 0.924198, 0.924211]),\n",
       " 'mean_test_score': array([0.923361, 0.926718, 0.926691, 0.926242, ..., 0.925294, 0.927048, 0.925847, 0.924581]),\n",
       " 'std_test_score': array([0.001831, 0.003824, 0.003425, 0.00197 , ..., 0.002628, 0.003528, 0.002275, 0.002726]),\n",
       " 'rank_test_score': array([104,  20,  23,  48, ...,  81,   8,  61,  94], dtype=int32)}"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xlf.cv_results_ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T10:39:59.481270Z",
     "start_time": "2019-09-03T10:39:59.450665Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9275440917207455 0.9360609597886036\n"
     ]
    }
   ],
   "source": [
    "print(xlf.best_score_, qk_np(y_train, xlf.predict(X_train)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T10:39:59.496794Z",
     "start_time": "2019-09-03T10:39:59.488512Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "xgboost-0903_05-26-03\n"
     ]
    }
   ],
   "source": [
    "model_save_name = \"xgboost-{}\".format(current_time)\n",
    "\n",
    "with open(os.path.join(deployment_dir, model_save_name+\".pkl\"), \"wb\") as f:\n",
    "    pk.dump(xlf.best_estimator_, f)\n",
    "\n",
    "print(model_save_name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## SVR "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:10:25.699155Z",
     "start_time": "2019-09-05T22:10:25.651108Z"
    }
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import SVR"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:15:58.721133Z",
     "start_time": "2019-09-05T22:15:58.071016Z"
    }
   },
   "outputs": [],
   "source": [
    "# svr = SVR(gamma=0.0001, C=100)\n",
    "estimator_svr = SVR()\n",
    "\n",
    "\n",
    "tuned_parameters = [{'kernel': ['rbf'], 'gamma': [1e-3, 1e-4],\n",
    "                     'C': [1, 10, 100, 1000]},\n",
    "                    {'kernel': ['linear'], 'C': [1, 10, 100, 1000]}]\n",
    "\n",
    "svr = GridSearchCV(estimator_svr, tuned_parameters, cv=5, n_jobs=16, scoring=score, verbose=1)\n",
    "svr.fit(X_train, y_train)\n",
    "\n",
    "print('Best parameters found by grid search are:', svr.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T12:30:02.208829Z",
     "start_time": "2019-09-03T12:30:02.197714Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'mean_fit_time': array([ 0.449111,  0.725864,  0.449926,  0.404292,  0.408877,  0.384097,  0.534327,  0.382056,  0.464625,  1.704576,\n",
       "        10.272197, 88.658682]),\n",
       " 'std_fit_time': array([3.030703e-02, 2.183755e-02, 8.633045e-02, 1.061797e-01, 3.863933e-03, 4.550244e-03, 1.438193e-02, 1.364801e-02,\n",
       "        3.683297e-02, 1.674361e-01, 1.229205e+00, 6.570119e+00]),\n",
       " 'mean_score_time': array([0.037776, 0.053958, 0.035569, 0.032954, 0.035365, 0.034078, 0.027068, 0.026811, 0.008165, 0.009239, 0.008616,\n",
       "        0.009378]),\n",
       " 'std_score_time': array([0.002869, 0.007793, 0.007139, 0.003456, 0.003501, 0.006972, 0.000804, 0.000662, 0.000259, 0.001165, 0.000126,\n",
       "        0.001421]),\n",
       " 'param_C': masked_array(data=[1, 1, 10, 10, 100, 100, 1000, 1000, 1, 10, 100, 1000],\n",
       "              mask=[False, False, False, False, False, False, False, False, False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_gamma': masked_array(data=[0.001, 0.0001, 0.001, 0.0001, 0.001, 0.0001, 0.001, 0.0001, --, --, --, --],\n",
       "              mask=[False, False, False, False, False, False, False, False,  True,  True,  True,  True],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_kernel': masked_array(data=['rbf', 'rbf', 'rbf', 'rbf', 'rbf', 'rbf', 'rbf', 'rbf', 'linear', 'linear', 'linear', 'linear'],\n",
       "              mask=[False, False, False, False, False, False, False, False, False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'params': [{'C': 1, 'gamma': 0.001, 'kernel': 'rbf'},\n",
       "  {'C': 1, 'gamma': 0.0001, 'kernel': 'rbf'},\n",
       "  {'C': 10, 'gamma': 0.001, 'kernel': 'rbf'},\n",
       "  {'C': 10, 'gamma': 0.0001, 'kernel': 'rbf'},\n",
       "  {'C': 100, 'gamma': 0.001, 'kernel': 'rbf'},\n",
       "  {'C': 100, 'gamma': 0.0001, 'kernel': 'rbf'},\n",
       "  {'C': 1000, 'gamma': 0.001, 'kernel': 'rbf'},\n",
       "  {'C': 1000, 'gamma': 0.0001, 'kernel': 'rbf'},\n",
       "  {'C': 1, 'kernel': 'linear'},\n",
       "  {'C': 10, 'kernel': 'linear'},\n",
       "  {'C': 100, 'kernel': 'linear'},\n",
       "  {'C': 1000, 'kernel': 'linear'}],\n",
       " 'split0_test_score': array([0.92665 , 0.905858, 0.928508, 0.927132, 0.928839, 0.929373, 0.929272, 0.929272, 0.928595, 0.928595, 0.928595,\n",
       "        0.928266]),\n",
       " 'split1_test_score': array([0.928446, 0.897393, 0.929836, 0.927875, 0.929629, 0.92948 , 0.929569, 0.929733, 0.929584, 0.929584, 0.929584,\n",
       "        0.930027]),\n",
       " 'split2_test_score': array([0.923754, 0.890172, 0.922991, 0.923754, 0.923328, 0.924003, 0.924002, 0.922926, 0.923489, 0.923489, 0.923154,\n",
       "        0.923154]),\n",
       " 'split3_test_score': array([0.919894, 0.888756, 0.921598, 0.919757, 0.922968, 0.922159, 0.921929, 0.92313 , 0.921763, 0.921763, 0.922159,\n",
       "        0.922669]),\n",
       " 'split4_test_score': array([0.920999, 0.890466, 0.922773, 0.921331, 0.922241, 0.922822, 0.921731, 0.920889, 0.923292, 0.923292, 0.921944,\n",
       "        0.921484]),\n",
       " 'mean_test_score': array([0.923951, 0.894533, 0.925143, 0.923972, 0.925403, 0.925569, 0.925303, 0.925192, 0.925347, 0.925347, 0.925089,\n",
       "        0.925122]),\n",
       " 'std_test_score': array([0.003247, 0.00641 , 0.003352, 0.003163, 0.003159, 0.003206, 0.003458, 0.003611, 0.003132, 0.003132, 0.003309,\n",
       "        0.003379]),\n",
       " 'rank_test_score': array([11, 12,  7, 10,  2,  1,  5,  6,  3,  3,  9,  8], dtype=int32)}"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svr.cv_results_ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T12:30:02.394012Z",
     "start_time": "2019-09-03T12:30:02.210477Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9255694040131046 0.9251493380866914\n"
     ]
    }
   ],
   "source": [
    "print(svr.best_score_, qk_np(y_train, svr.predict(X_train)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-05T22:17:48.658945Z",
     "start_time": "2019-09-05T22:17:48.650747Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "svr-0906_06-09-42\n"
     ]
    }
   ],
   "source": [
    "model_save_name = \"svr-{}\".format(current_time)\n",
    "\n",
    "with open(os.path.join(deployment_dir, model_save_name+\".pkl\"), \"wb\") as f:\n",
    "# with open(os.path.join(deployment_dir, \"svr-0903_05-26-03.pkl\"), \"wb\") as f:\n",
    "    pk.dump(svr.best_estimator_, f)    \n",
    "#     pk.dump(svr, f)\n",
    "\n",
    "print(model_save_name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## CatBoost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T16:09:09.194775Z",
     "start_time": "2019-09-06T16:09:09.172957Z"
    }
   },
   "outputs": [],
   "source": [
    "from catboost import CatBoostRegressor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2019-09-06T08:44:40.279Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 5 folds for each of 1920 candidates, totalling 9600 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=16)]: Using backend LokyBackend with 16 concurrent workers.\n",
      "[Parallel(n_jobs=16)]: Done  18 tasks      | elapsed:    5.8s\n",
      "[Parallel(n_jobs=16)]: Done 168 tasks      | elapsed:  1.0min\n",
      "[Parallel(n_jobs=16)]: Done 418 tasks      | elapsed:  3.4min\n",
      "[Parallel(n_jobs=16)]: Done 768 tasks      | elapsed:  6.0min\n",
      "/home/ai/anaconda3/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py:706: UserWarning: A worker stopped while some jobs were given to the executor. This can be caused by a too short worker timeout or by a memory leak.\n",
      "  \"timeout or by a memory leak.\", UserWarning\n",
      "[Parallel(n_jobs=16)]: Done 1218 tasks      | elapsed: 11.3min\n",
      "[Parallel(n_jobs=16)]: Done 1768 tasks      | elapsed: 17.0min\n",
      "[Parallel(n_jobs=16)]: Done 2418 tasks      | elapsed: 23.5min\n",
      "[Parallel(n_jobs=16)]: Done 3168 tasks      | elapsed: 31.3min\n",
      "[Parallel(n_jobs=16)]: Done 4018 tasks      | elapsed: 40.5min\n",
      "[Parallel(n_jobs=16)]: Done 4968 tasks      | elapsed: 49.1min\n",
      "[Parallel(n_jobs=16)]: Done 6018 tasks      | elapsed: 61.9min\n",
      "[Parallel(n_jobs=16)]: Done 7168 tasks      | elapsed: 73.2min\n"
     ]
    }
   ],
   "source": [
    "estimator_cb = CatBoostRegressor(random_seed=SEED)\n",
    "\n",
    "params = {\n",
    "          'depth':[3,1,2,6,4,5],\n",
    "#           'iterations':[500],\n",
    "          'iterations':[250,500,750,1000],\n",
    "#           'learning_rate':[0.2], \n",
    "          'learning_rate':[0.01,0.1,0.2,0.3], \n",
    "          'l2_leaf_reg':[3,1,5,10],\n",
    "          'border_count':[100,128, 200, 254, 300]\n",
    "         }\n",
    "\n",
    "cb = GridSearchCV(estimator_cb, params, cv=5, n_jobs=16, scoring=score, verbose=1)\n",
    "cb.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:41:32.123763Z",
     "start_time": "2019-09-06T19:41:32.009614Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best parameters found by grid search are: {'border_count': 100, 'depth': 2, 'iterations': 1000, 'l2_leaf_reg': 3, 'learning_rate': 0.01}\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'mean_fit_time': array([ 2.073691,  2.13434 ,  2.14068 ,  2.136364, ..., 20.142412, 20.179307, 19.689002, 19.617364]),\n",
       " 'std_fit_time': array([0.03681 , 0.069325, 0.049825, 0.106818, ..., 0.458016, 0.108471, 0.229954, 0.672636]),\n",
       " 'mean_score_time': array([0.017744, 0.0152  , 0.016812, 0.012601, ..., 0.023632, 0.027577, 0.020001, 0.017893]),\n",
       " 'std_score_time': array([0.003141, 0.00561 , 0.002328, 0.004984, ..., 0.003495, 0.00803 , 0.010126, 0.006715]),\n",
       " 'param_border_count': masked_array(data=[100, 100, 100, 100, ..., 300, 300, 300, 300],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_depth': masked_array(data=[3, 3, 3, 3, ..., 5, 5, 5, 5],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_iterations': masked_array(data=[250, 250, 250, 250, ..., 1000, 1000, 1000, 1000],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_l2_leaf_reg': masked_array(data=[3, 3, 3, 3, ..., 10, 10, 10, 10],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_learning_rate': masked_array(data=[0.01, 0.1, 0.2, 0.3, ..., 0.01, 0.1, 0.2, 0.3],\n",
       "              mask=[False, False, False, False, ..., False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'params': [{'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 100,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 6,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 4,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 128,\n",
       "   'depth': 5,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 3,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 1,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 2,\n",
       "   'iterations': 1000,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 250,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 5,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 500,\n",
       "   'l2_leaf_reg': 10,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 3,\n",
       "   'learning_rate': 0.3},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.01},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.1},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.2},\n",
       "  {'border_count': 200,\n",
       "   'depth': 6,\n",
       "   'iterations': 750,\n",
       "   'l2_leaf_reg': 1,\n",
       "   'learning_rate': 0.3},\n",
       "  ...],\n",
       " 'split0_test_score': array([0.910979, 0.930141, 0.924152, 0.92528 , ..., 0.930595, 0.92417 , 0.92391 , 0.915974]),\n",
       " 'split1_test_score': array([0.900942, 0.921198, 0.924285, 0.921151, ..., 0.925458, 0.921251, 0.921917, 0.919641]),\n",
       " 'split2_test_score': array([0.899634, 0.920312, 0.92029 , 0.920466, ..., 0.928835, 0.925104, 0.923893, 0.918384]),\n",
       " 'split3_test_score': array([0.899869, 0.922457, 0.919239, 0.913689, ..., 0.923445, 0.923584, 0.916461, 0.913718]),\n",
       " 'split4_test_score': array([0.898955, 0.924063, 0.919855, 0.91821 , ..., 0.921103, 0.918676, 0.914565, 0.918227]),\n",
       " 'mean_test_score': array([0.902078, 0.923635, 0.921566, 0.919761, ..., 0.925888, 0.922557, 0.920151, 0.917189]),\n",
       " 'std_test_score': array([0.004498, 0.003491, 0.002194, 0.003799, ..., 0.003461, 0.00232 , 0.0039  , 0.0021  ]),\n",
       " 'rank_test_score': array([1843,  757, 1205, 1464, ...,  169, 1039, 1400, 1699], dtype=int32)}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('Best parameters found by grid search are:', cb.best_params_)\n",
    "cb.cv_results_ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:41:50.906387Z",
     "start_time": "2019-09-06T19:41:50.877805Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.927644233342091 0.9269977028467353\n"
     ]
    }
   ],
   "source": [
    "print(cb.best_score_, qk_np(y_train, cb.predict(X_train)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:41:54.490437Z",
     "start_time": "2019-09-06T19:41:54.482030Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cb-0906_06-09-42\n"
     ]
    }
   ],
   "source": [
    "model_save_name = \"cb-{}\".format(current_time)\n",
    "\n",
    "with open(os.path.join(deployment_dir, model_save_name+\".pkl\"), \"wb\") as f:\n",
    "    pk.dump(cb.best_estimator_, f)    \n",
    "\n",
    "print(model_save_name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:46:31.570025Z",
     "start_time": "2019-09-06T19:46:31.549268Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n",
      "(1928, 1)\n"
     ]
    }
   ],
   "source": [
    "b3_test_logits_list = []\n",
    "for m in b3_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits_test.npy\".format(m))\n",
    "    b3_test_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "    \n",
    "b4_test_logits_list = []\n",
    "for m in b4_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits_test.npy\".format(m))\n",
    "    b4_test_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "\n",
    "b5_test_logits_list = []\n",
    "for m in b5_models:\n",
    "    logits = np.load(\"../output/stacking/{}_logits_test.npy\".format(m))\n",
    "    b5_test_logits_list.append(logits)\n",
    "\n",
    "    print(logits.shape)\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## LightGBM "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T17:04:57.344705Z",
     "start_time": "2019-09-03T17:04:57.341799Z"
    }
   },
   "outputs": [],
   "source": [
    "# model_save_name = \"lightgbm-0903_05-26-03\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T07:42:15.436232Z",
     "start_time": "2019-09-04T07:42:15.308649Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFV1JREFUeJzt3X+U5XV93/HnKyy/ZA2LYDa4u3HtkZBQaAxMkcQmZ1ZyEn4YoAm0pEQWDumethqxmlOI57TEJG2wJ8QftEfPKkQU4oLEBgJYpcDWmhYqq4QFCWExVBcIKy4srmIUffeP+12dDLM7c++duXd2P8/HOXP2++Pz/X7e89m59zXfz733O6kqJEnt+aFxFyBJGg8DQJIaZQBIUqMMAElqlAEgSY0yACSpUQaA9mlJPpzk95P8XJKHx13P7iR5R5IPjbsOtWXJuAuQRqGq/hdw9Ljr2J2q+k/jrkHt8QpAkhplAGifkuSnk3w+ydeTXA8c1G2fTLJ1SrtLkzzatftikn86Zd9+Sa5I8nSSv0ny5iSVZEm3f2OS30vyF93xn05yxJTjz0jy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s6BjtbcHwFxuLXEzsLZbPhu4s7pXVMZZ17Q54jPozeEuBjcD53fvbDkJ2FFVT467qCQ/umvuM8mJ9H52vzaCfgNcBTxUVX+0m2YjH7O51DWOMUvy8iTLuuWDgV8A/mpas5E/JudS16gfk1X121W1sqpW03uOuLOqfn1aswUdq1HfDXRe1W5uLZHkd4F7q+pmeg+SjybZQi85z10kdb0lyRnAC11dFyx0XQBJPkbv3SFHJNkKXEbvBTGq6gPAbfTe1bIF+CZw4SKp62zgXyd5AXgeOHcEQQ6939LeCGzu5o8B3gH82JTaxjFmc6lrHGN2JHBNen/86YeAG6rqlnE/JudY11gek9ONcqy8FYQkNWpvnwKSJA3IAJCkRhkAktQoA0CSGmUASFKjDABJapQBIEmN+v+2rtWGonj+3gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/lightgbm-0904_04-09-19-5-fold_avg_logits_test.csv\n"
     ]
    }
   ],
   "source": [
    "b3_test_avg_feats = np.average(b3_test_logits_list, axis=0)\n",
    "b4_test_avg_feats = np.average(b4_test_logits_list, axis=0)\n",
    "b5_test_avg_feats = np.average(b5_test_logits_list, axis=0)\n",
    "\n",
    "\n",
    "X_test = np.concatenate([b3_test_avg_feats, b4_test_avg_feats, b5_test_avg_feats], axis=1)\n",
    "y_pred = gbm.predict(X_test)\n",
    "\n",
    "y_pred = np.round(y_pred)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_avg_logits_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T10:30:07.218144Z",
     "start_time":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kqVEGgCQ1ygCQpEYZAJLUKANAkhplAEhSo/4/t2zvdpsEItcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/lightgbm-0904_04-09-19-5-fold_logits_avg_test.csv\n"
     ]
    }
   ],
   "source": [
    "# 5 test feature then avg\n",
    "\n",
    "results = []\n",
    "for b3, b4, b5 in zip(b3_test_logits_list, b4_test_logits_list, b5_test_logits_list):\n",
    "    X_test = np.concatenate([b3, b4, b5], axis=1)\n",
    "    res = gbm.predict(X_test)\n",
    "    results.append(res)\n",
    "\n",
    "avg_res_gbm = np.average(results, axis=0)\n",
    "np.save(\"../output/submission/{}-5-fold_logits_avg_test_logits.npy\".format(model_save_name), avg_res_gbm)\n",
    "y_pred = np.round(avg_res_gbm)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_logits_avg_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## XGBoost "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T10:32:07.920482Z",
     "start_time": "2019-09-04T10:32:07.915008Z"
    }
   },
   "outputs": [],
   "source": [
    "model_save_name = \"xgboost-0903_05-26-03\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T10:51:13.945653Z",
     "start_time": "2019-09-03T10:51:13.676091Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAA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j183B3u7m4d3XzHeajPwxOc+6Ri7JauBc4H0H6LKoc/VsD4BVwFen3d7JMx8EP+pTVfuAPcBxS6AugF/vlgxuSbJmlv3jMN/ax+Hnukv4jyX5e6MevLv8/ll6zx6nG+ucHaQuGMOcdUsanwN2A3dW1QHna4SPyfnUBaN/TL4D+NfADw+wf1Hn6tkeAHN+tMQ8+yy0+Yz5p8Daqvr7wP/g6ZQft3HM13x8ht7nm/wMcC3wJ6McPMly4I+BN1bVN2funuWQkczZHHWNZc6q6gdV9XJ6f+l/epKTZ3QZy3zNo66RPiaTvBrYXVVbD9ZtlrYFm6tnewDM56MlftQnyTLgGBZ/qWHOuqrq61X1N93N9wKnLXJN87UkP66jqr65/xK+qu4ADk9y/CjGTnI4vV+yN1bVR2fpMpY5m6uucc5ZN+Y3gCngrBm7xvGYnLOuMTwmXwmcl2QHvWXiVyW5YUafRZ2rZ3sAzOejJbYA67vt1wB3V/eKyjjrmrFGfB69NdylYAtwSffOljOAPVW1a9xFJfmJ/WufSU6nd9/9+gjGDXAd8GBV/eEBuo18zuZT1zjmLMkLkqzoto8Gfgn4ixndRv6YnE9do35MVtXvVtXqqlpL73fE3VX1mzO6LepcjfrTQBdUHeCjJZL8PnB/VW2h9yD5UJLt9JLzoiVS1xuSnAfs6+q6dLHrAkjyYXrvDjk+yU7gKnoviFFV7wHuoPeulu3Ad4DLlkhdrwH+RZJ9wFPARSMIcug9S3stsK1bPwZ4C/CT02obx5zNp65xzNkJwPXp/edPPwbcXFW3jfsxOc+6xvKYnGmUc+VHQUhSo57tS0CSpAEZAJLUKANAkhplAEhSowwASWqUASBJjTIAJKlR/x8t6tKKKSQDyAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/xgboost-0903_05-26-03-5-fold_avg_logits_test.csv\n"
     ]
    }
   ],
   "source": [
    "b3_test_avg_feats = np.average(b3_test_logits_list, axis=0)\n",
    "b4_test_avg_feats = np.average(b4_test_logits_list, axis=0)\n",
    "b5_test_avg_feats = np.average(b5_test_logits_list, axis=0)\n",
    "\n",
    "\n",
    "X_test = np.concatenate([b3_test_avg_feats, b4_test_avg_feats, b5_test_avg_feats], axis=1)\n",
    "y_pred = xlf.predict(X_test)\n",
    "\n",
    "y_pred = np.round(y_pred)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_avg_logits_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T10:32:41.938921Z",
     "start_time": "2019-09-04T10:32:41.645027Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFWBJREFUeJzt3X+U5XV93/HnKyy/dA2LYDa4u3HtkZBQaAxMkcQmZ1ZyEkADNMGWlMjCId3TViNWcwrxnJaYpA32hPiD9uhZxYhCXJDY7AaxSoGpNS1UVw2LEsNitrpAWHFhdXWNou/+cb+rk2F2Z+69M/cO+3k+zpmz3/v5fr7fz3s+O995zfdz79xJVSFJas8PjbsASdJ4GACS1CgDQJIaZQBIUqMMAElqlAEgSY0yAHRIS/LeJL+f5OeSfGHc9RxIkjcmefe461Bblo27AGkUqup/ASeNu44Dqar/NO4a1B7vACSpUQaADilJfjrJp5N8PcnNwFFd+2SSndP6XZXkoa7f55P802n7DktybZLHk/x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OWddY7gmXwqcl2QHvWXilyW5cUafRZ2rZ3oAzOetJbYA67vtC4G7qntGZZx1zVgjPo/eGu5SsAW4pHtly5nAnqp6dNxFJfnR/WufSc6g97X71RGMG+B64IGq+qMDdBv5nM2nrnHMWZLnJVnRbR8N/ALwVzO6jfyanE9do74mq+q3q2p1Va2l9z3irqr69RndFnWuRv1uoAuqDvDWEkl+F/hUVW2hd5G8P8l2esl50RKp67VJzgOe6uq6dLHrAkjyAXqvDjk+yU7ganpPiFFV7wRup/eqlu3AN4HLlkhdFwL/OslTwD7gohEEOfR+SnsVsK1bPwZ4I/Bj02obx5zNp65xzNkJwA3p/fGnHwJuqarbxn1NzrOusVyTM41yrnwrCElq1DN9CUiSNCADQJIaZQBIUqMMAElqlAEgSY0yACSpUQaAJDXq/wOK8tWGidFDgQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/xgboost-0903_05-26-03-5-fold_logits_avg_test.csv\n"
     ]
    }
   ],
   "source": [
    "# 5 test feature then avg\n",
    "results = []\n",
    "for b3, b4, b5 in zip(b3_test_logits_list, b4_test_logits_list, b5_test_logits_list):\n",
    "    X_test = np.concatenate([b3, b4, b5], axis=1)\n",
    "    res = xlf.predict(X_test)\n",
    "    results.append(res)\n",
    "\n",
    "avg_res_xlf = np.average(results, axis=0)\n",
    "np.save(\"../output/submission/{}-5-fold_logits_avg_test_logits.npy\".format(model_save_name), avg_res_xlf)\n",
    "y_pred = np.round(avg_res_xlf)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_logits_avg_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## SVR "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T10:33:00.762429Z",
     "start_time": "2019-09-04T10:33:00.747208Z"
    }
   },
   "outputs": [],
   "source": [
    "model_save_name = \"svr-0903_05-26-03\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-03T14:02:45.516604Z",
     "start_time": "2019-09-03T14:02:45.248042Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFWNJREFUeJzt3X+UpmV93/H3Jyy/dA2LYDa4u3HtkZhQaAxMkcQmZ1ZyEn4YoYm2pEQWDumethqxmFM2ntMSk7TBnhB/0B49qxhRiQsSGwhglQJba1qoLBIWJYTFbHGBsOLC4gpGwW//eO6VyTC7M8/zzDzPsNf7dc6cuX9c9319n2vnns/c1/NjU1VIktrzQ+MuQJI0HgaAJDXKAJCkRhkAktQoA0CSGmUASFKjDADt15J8LMnvJ/m5JPeNu569SfKuJB8Zdx1qy5JxFyCNQlX9L+DV465jb6rqP427BrXHOwBJapQBoP1Kkp9OcmeSbyW5Cjik2z6ZZPuUduuTPNC1+2qSfzpl3wFJLk3yWJK/SfK2JJVkSbd/U5LfS/IX3fGfT3LklOPfmOQrSZ7o2v7klH0XJXmoO+6+JCd3238nySe75UOSfDLJN7tzfCnJ8gUfPDXHANB+I8lBwJ8BnwBeCnwa+NW9NH8A+DngMODdwCeTHNXt+5fAqcBrgOOBM2c4/l8A5wE/AhwE/FZXw48DnwLeAbwMuBH48yQHJXk18DbgH1fVS4BfArbNc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e6Rn1NVtVvV9XKqlpN73fELVX169OaLehYjfrTQOdV7eWjJZL8LnBHVV1H7yL5RJKt9JLzrEVS19uTvBF4pqvr3IWuCyDJp+i9OuTIJNuBi+k9IUZVfQi4kd6rWrYCTwHnLZK63gT86yTPAE8DZ40gyKH3V9pbgC3d/DHAu4Afm1LbOMZsLnWNY8yOAq5I7z9/+iHg6qq6ftzX5BzrGss1Od0ox8qPgpCkRr3Qp4AkSQMyACSpUQaAJDXKAJCkRhkAktQoA0CSGmUASFKj/j8y6s+n64eihAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/svr-0903_05-26-03-5-fold_avg_logits_test.csv\n"
     ]
    }
   ],
   "source": [
    "b3_test_avg_feats = np.average(b3_test_logits_list, axis=0)\n",
    "b4_test_avg_feats = np.average(b4_test_logits_list, axis=0)\n",
    "b5_test_avg_feats = np.average(b5_test_logits_list, axis=0)\n",
    "\n",
    "\n",
    "X_test = np.concatenate([b3_test_avg_feats, b4_test_avg_feats, b5_test_avg_feats], axis=1)\n",
    "y_pred = svr.predict(X_test)\n",
    "\n",
    "y_pred = np.round(y_pred)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_avg_logits_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T10:33:16.929297Z",
     "start_time": "2019-09-04T10:33:15.995756Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAA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3UdY1FVX0B2LmPJmcAH6+e24BlSY5aBHWNRVU9UlV3dsvfAu4FVkxrNvIxm2NdI9eNwe5u9cDua/orTUZ+Tc6xrpFLshI4HfjIXpos6Fi90ANgBfD1Kevbef5F8IM2VfUMsAs4YhHUBfCr3ZTBNUlWzbB/HOZa+zj8THcL/9kk/3DUnXe33z9N76/HqcY6ZvuoC8YwZt2Uxl3ADuCmqtrreI3wmpxLXTD6a/J9wL8Dvr+X/Qs6Vi/0AJj1oyXm2Ga+zaXPPwdWV9U/Av4Hz6X8uI1jvObiTnqfb/JTwGXAn42y8yRLgT8F3lFVT07fPcMhIxmzWeoay5hV1bNV9Rp67/Q/Mcmx05qMZbzmUNdIr8kkbwB2VNXmfTWbYdu8jdULPQDm8tESP2iTZAlwGAs/1TBrXVX1zar6u271w8AJC1zTXC3Kj+uoqif33MJX1Y3AgUmOHEXfSQ6k90v2yqr6zAxNxjJms9U1zjHr+nwC2AScMm3XOK7JWesawzX5OuCNSbbRmyZ+fZJPTmuzoGP1Qg+AuXy0xHXA2m75TcAt1T2jMs66ps0Rv5HeHO5icB1wTvfKlpOAXVX1yLiLSvKje+Y+k5xI72f3myPoN8DlwL1V9Ud7aTbyMZtLXeMYsyQvS7KsWz4U+AXgr6Y1G/k1OZe6Rn1NVtVvV9XKqlpN73fELVX169OaLehYjfrTQOdV7eWjJZL8LnBHVV1H7yL5RJKt9JLzrEVS19uTvBF4pqvr3IWuCyDJp+i9OuTIJNuBi+k9IUZVfQi4kd6rWrYCTwHnLZK63gT86yTPAE8DZ40gyKH3V9pbgC3d/DHAu4Afm1LbOMZsLnWNY8yOAq5I7z9/+iHg6qq6ftzX5BzrGss1Od0ox8qPgpCkRr3Qp4AkSQMyACSpUQaAJDXKAJCkRhkAktQoA0CSGmUASFKj/j8y6s+n64eihAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/svr-0903_05-26-03-5-fold_logits_avg_test.csv\n"
     ]
    }
   ],
   "source": [
    "# 5 test feature then avg\n",
    "\n",
    "results = []\n",
    "for b3, b4, b5 in zip(b3_test_logits_list, b4_test_logits_list, b5_test_logits_list):\n",
    "    X_test = np.concatenate([b3, b4, b5], axis=1)\n",
    "    res = svr.predict(X_test)\n",
    "    results.append(res)\n",
    "\n",
    "avg_res_svr = np.average(results, axis=0)\n",
    "np.save(\"../output/submission/{}-5-fold_logits_avg_test_logits.npy\".format(model_save_name), avg_res_svr)\n",
    "y_pred = np.round(avg_res_svr)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_logits_avg_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## CatBoost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:46:37.450365Z",
     "start_time": "2019-09-06T19:46:37.318254Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFWNJREFUeJzt3X+43nV93/Hnq4RfEksQbIpJatwls3NktXCGtK69TkyvFtAKa3WjoxK46HJt04rTXiP1ujZq2224q9QfbJdeUZxRqQGpa1LEKQMyZzeYBKkBqSVYpgFKxEA0glX0vT/ub+T0cJJz7vs+574P+Twf13Wu8/3x+X4/7/uTfM/rfD/3j5OqQpLUnh8Zd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Zcyq6vtV9TJ67/Q/I8mp05qMZbzmUNdIr8kkrwb2VNWOQzWbYdu8jdWzPQDm8tESP2yTZAlwPAs/1TBrXVX1jar6m271/cDpC1zTXC3Kj+uoqm8euIWvqhuBI5OcNIq+kxxJ74fsNVX1iRmajGXMZqtrnGPW9fk4sB04a9qucVyTs9Y1hmvyFcBrkjxAb5r4lUk+Oq3Ngo7Vsz0A5vLREtuA9d3ya4FbqntGZZx1TZsjfg29OdzFYBtwYffKljOBfVX18LiLSvLjB+Y+k5xB7//uN0bQb4CrgXur6g8P0mzkYzaXusYxZkmen2RZt3ws8AvAX0xrNvJrci51jfqarKrfrqqVVbWa3s+IW6rq16c1W9CxGvWngc6rOshHSyT5XeCOqtpG7yL5SJJd9JLz/EVS15uSvAZ4qqvrooWuCyDJx+i9OuSkJLuBy+k9IUZVvQ+4kd6rWnYBTwAXL5K6Xgv8yyRPAU8C548gyKH3W9rrgZ3d/DHA24CfmFLbOMZsLnWNY8xOBjan98effgS4rqpuGPc1Oce6xnJNTjfKsfKjICSpUc/2KSBJ0oAMAElqlAEgSY0yACSpUQaAJDXKAJCkRhkAktSo/w8eHtGfMJ55TQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/cb-0906_06-09-42-5-fold_avg_logits_test.csv\n"
     ]
    }
   ],
   "source": [
    "b3_test_avg_feats = np.average(b3_test_logits_list, axis=0)\n",
    "b4_test_avg_feats = np.average(b4_test_logits_list, axis=0)\n",
    "b5_test_avg_feats = np.average(b5_test_logits_list, axis=0)\n",
    "\n",
    "\n",
    "X_test = np.concatenate([b3_test_avg_feats, b4_test_avg_feats, b5_test_avg_feats], axis=1)\n",
    "y_pred = cb.predict(X_test)\n",
    "\n",
    "y_pred = np.round(y_pred)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_avg_logits_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-06T19:46:42.960870Z",
     "start_time": "2019-09-06T19:46:42.824925Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFW9JREFUeJzt3X+0XWV95/H3p4QfSixBsCkmqXGWjB2HTC3cQVqnXTfSVQEtcVqdoUMlsOhkzVQrDnaV1LVmqG1nFs4q9QczS1cURxRqQOoUijjKIBnHTmU0agmYWoLNSIASMSEawWr0O3+cjd5ebnLvOefec27yvF9r3ZW99/Psvb/nyd33c/Zzzj03VYUkqT0/Mu4CJEnjYQBIUqMMAElqlAEgSY0yACSpUQaAJDXKANARLcn7k/xBkp9L8uVx13MwSd6c5L3jrkNtWTLuAqRRqKr/Dbxw3HUcTFX9p3HXoPZ4ByBJjTIAdERJ8tNJPp/km0luBI7rtk8m2TWl38YkD3T9vpTkn09pOyrJ1UkeS/I3SV6fpJIs6dq3JPn9JH/e7f+JJCdP2f/8JPclebzr+4+mtF2R5KFuvy8nObvb/rtJru+Wj0tyfZKvd8f4bJLlCz54ao4BoCNGkmOAPwU+CDwb+DDwKwfp/gDwc8AJwFuA65Oc0rX9a+Bc4MXA6cCrZtj/XwGXAD8GHAP8VlfDPwQ+BLwReA5wO/BnSY5J8kLg9cA/rapnAS8Hds5w7PVdXauAk4B/Azw5lzGQ+mEA6EhyFnA08Paq+m5V3Qx8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TQOdVHeSjJZL8HvC5qrqV3kXywSQ76CXnBYukrjckOR840NV18ULXBZDkQ/TeHXJykl3AlfReEKOq3g3cTu9dLTuAJ4BLFkldrwb+bZIDwJPABSMIcug9S3stsK2bPwZ4M/ATU2obx5jNpa5xjNkpwHXp/fGnHwFuqqrbxn1NzrGusVyT041yrPwoCElq1OE+BSRJGpABIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhr1/wGlbuEw1dARtwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "../output/submission/cb-0906_06-09-42-5-fold_logits_avg_test.csv\n"
     ]
    }
   ],
   "source": [
    "# 5 test feature then avg\n",
    "\n",
    "results = []\n",
    "for b3, b4, b5 in zip(b3_test_logits_list, b4_test_logits_list, b5_test_logits_list):\n",
    "    X_test = np.concatenate([b3, b4, b5], axis=1)\n",
    "    res = cb.predict(X_test)\n",
    "    results.append(res)\n",
    "\n",
    "avg_res_svr = np.average(results, axis=0)\n",
    "np.save(\"../output/submission/{}-5-fold_logits_avg_test_logits.npy\".format(model_save_name), avg_res_svr)\n",
    "y_pred = np.round(avg_res_svr)\n",
    "\n",
    "test_df.diagnosis = y_pred.astype(int)\n",
    "\n",
    "test_df.hist()\n",
    "plt.show()\n",
    "\n",
    "submition_filename = \"../output/submission/{}-5-fold_logits_avg_test.csv\".format(model_save_name)\n",
    "test_df.to_csv(submition_filename, index=False)\n",
    "print(submition_filename)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Correlation Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2019-09-04T07:53:26.700102Z",
     "start_time": "2019-09-04T07:53:26.693887Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.      , 0.998509, 0.997369],\n",
       "       [0.998509, 1.      , 0.997143],\n",
       "       [0.997369, 0.997143, 1.      ]])"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.corrcoef([avg_res_gbm, avg_res_xlf, avg_res_svr])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "240.65px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
